Next: Header arguments in function calls, Previous: Header arguments in Org-mode properties, Up: Using header arguments
The most common way to assign values to header arguments is at
the code block level. This can be done by listing a sequence of
header arguments and their values as part of the
#+begin_src line. Properties set in this way
override both the values of
org-babel-default-header-args and header arguments
specified as properties. In the following example, the
:results header argument is set to
silent, meaning the results of execution will not be
inserted in the buffer, and the :exports header
argument is set to code, meaning only the body of
the code block will be preserved on export to HTML or LaTeX.
#+source: factorial
#+begin_src haskell :results silent :exports code :var n=0
fac 0 = 1
fac n = n * fac (n-1)
#+end_src
Similarly, it is possible to set header arguments for inline code blocks:
src_haskell[:exports both]{fac 5}